package com.zl.task.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zl.task.dto.MechanismDTO;
import com.zl.task.pojo.ServiceMechanism;
import com.zl.task.vo.MechanismLoginVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yinlingeng
 * @since 2021-07-23
 */
public interface IServiceMechanismService extends IService<ServiceMechanism> {

    /**
     * 机构用户登录
     * @param userName -
     * @param password -
     * @return MechanismLoginVO
     */
    MechanismLoginVO getMechanism(String userName, String password) throws Exception;

    /**
     * 机构用户信息维护（修改）
     * @return Boolean
     */
    Boolean updateMechanism(MechanismDTO mechanismDTO) throws Exception;

    /**
     * 根据id查询用户
     * @param id -
     * @return ServiceMechanism
     */
    ServiceMechanism getMenchanismById(String id);

    /**
     * 密码修改
     * @param newPassword -
     * @return Boolean
     */
    Boolean updatePassword(String type,Long id,String password, String newPassword) throws Exception;

    /**
     * 所有机构用户
     * @return
     */
    List<ServiceMechanism> listMechanism();

}
